// Child.jsx 子组件
import { Component } from 'react'
import '../assets/css/Child.css'

export default class Child extends Component {
  render () {
    console.log("基于类型的组件，默认包含props属性：", this.props)
    const { fromParent } = this.props
    return (
      <div className="child-container">
        <h3>子组件</h3>
        <p>来自父组件的数据：{this.props.fromParent}</p>
        <p>来自父组件的数据：{fromParent}</p>
      </div>
    )
  }
}
